package com.ay277.htqoa.staff.controller;

import com.ay277.htqoa.staff.biz.EventBiz;
import com.ay277.htqoa.staff.entity.Event;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by hghh on 2016/12/19.
 */
@Controller
@RequestMapping("/event")
public class EventController   {
    @Autowired
    private EventBiz eventBiz;
    @RequestMapping("/saveEvent")
    @ResponseBody
    public Object save(Event event){
        eventBiz.doSave(event);
        return event;
    }
    @RequestMapping("/listEvent")
    @ResponseBody
    public List<Event> list(String start,String end){
        List<Event> list = eventBiz.FindEvent(start,end);
        return list;
    }

}
